<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>vue-qq</title>
    <meta name="viewport" content="width=device-width,height=device-height,
    initial-scale=1.0,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <link rel="shortcut icon" href="/static/logo.png" type="image/x-icon" />
  </head>
  <body>
    <div id="app"></div>
    <script src="http://localhost:3000/socket.io/socket.io.js"></script>
    <script type="text/javascript">
      const socket = io.connect('http://localhost:3000');
      //解决用户手动刷新浏览器后，原来的socketid失效的问题
      const loginStatus= JSON.parse(localStorage.getItem("loginStatus") || '{}');
      loginStatus.isLogin && socket.emit('update',loginStatus.userId);
    </script>
  </body>
</html>
